<?php

class SRateTbl_5h extends SRate_5h
{

    public $sLottoId = 0;
    public $diskIdxArr = array
        (
        "a"=>1,
        "b"=>2,
        "c"=>3,
        "d"=>4
    );
    public $show5N = false;
    public $tblW = "753";
    public $reloadUrl = "#";
    public $subURL = "#";
    public $tblNo = 0;
    public $subid = 0;
    public $diskName = "";
    public $bignumArr = array
        (
        1=>"平码一",
        2=>"平码二",
        3=>"平码三",
        4=>"平码四",
        5=>"特码"
    );
    public $colorname3 = array();
    public $colorname = array();
    public $betXYArr = array();
    public $_5hFlag = true;

    public function show_srateTbl($playtype = "r1",$disk = "a",$subid = 0,$bid = 0)
    {
        global $g_colorname3;
        global $g_colorname;
        global $g_disk_name;
        global $g_betXYArr;
        $tempIdx = $this->diskIdxArr[$disk];
        $this->diskName = $g_disk_name[$tempIdx];
        if ( $this->gametype == 20 )
        {
            $this->betXYArr = $g_betXYArr[$this->gametype];
            $this->bignumArr = array(1=>"平码一",2=>"平码二",3=>"平码三",4=>"平码四",5=>"特码");
            $this->colorname3 = $g_colorname3;
            $this->colorname = $g_colorname;
            $this->_5hFlag = true;
            switch ( $playtype )
            {
                case "r1" :
                    return $this->show_r1($disk,$subid);
                case "r1clr" :
                    return $this->show_r1clr($disk,$subid);
                case "rnp" :
                    return $this->show_rnp($disk,$subid);
                case "rc" :
                    return $this->show_rc($disk,$subid,$bid);
                default :
                    return "系统维护中 -1";
            }
        }
        else if ( $this->gametype == 24 )
        {
            $this->betXYArr = $g_betXYArr[$this->gametype];
            $this->bignumArr = array(0=>"冠亚",1=>"冠军",2=>"亚军",3=>"季军",4=>"第四",5=>"第五",6=>"第六",7=>"第七",8=>"第八",9=>"第九",10=>"第十");
            $this->colorname3 = NULL;
            $this->colorname = NULL;
            $this->_5hFlag = true;
            switch ( $playtype )
            {
                case "r1" :
                    return $this->show_r1_8h($disk,$subid);
                case "rnp" :
                    return $this->show_rnp_8h($disk,$subid);
                case "rc" :
                    return $this->show_rc_8h($disk,$subid,$bid);
                default :
                    return "系统维护中 -1";
            }
        }
        $this->betXYArr = array();
        $this->bignumArr = array(1=>"第一球",2=>"第二球",3=>"第三球",4=>"第四球",5=>"第五球",6=>"第六球",7=>"第七球",8=>"第八球");
        $this->colorname3 = array(1=>"东",2=>"南",3=>"西",4=>"北");
        $this->colorname = array(1=>"中",2=>"发",3=>"白");
        $this->_5hFlag = false;
        switch ( $playtype )
        {
            case "r1" :
                return $this->show_r1_8h($disk,$subid);
            case "r1clr" :
                return $this->show_r1clr_8h($disk,$subid);
            case "rnp" :
                return $this->show_rnp_8h($disk,$subid);
            case "rc" :
                return $this->show_rc_8h($disk,$subid,$bid);
            default :
                return "系统维护中 -1";
        }
    }

    public function crtQuickBtnCountXY($colspan = 0,$subTitle = "")
    {
        $subTitle = $subTitle == "" ? "" : $subTitle . " ◎ ";
        $str = "<tr><td colspan=\"" . $colspan . "\" class=\"msgBox-yellow\" style=\"text-align:right;padding-bottom:10px;\">" . $subTitle . " 赔率Ｙ ＝ 赔率Ｘ － <input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" id=\"inpXsubNForY\" /> <input type=\"button\" onclick=\"javascript:xSubNforY();\" value=\"计算\" class=\"c3\" /></td></tr>";
        return $str;
    }

    public function crtQuickBtn2face($rdiArr = array(),$colSpanN = "11",$r0To9Flag = true,$showArr = array(0=>1,1=>1,2=>1,3=>1),$next = 0,$xyFlag = false)
    {
        $rdiStr = "";
        $titleLabel = "";
        $tblNo = $this->tblNo;
        if ( 1 < count($rdiArr) )
        {
            $rdiStr .= "玩法快调";
            $i = 0;
            foreach ( $rdiArr as $key=> $val )
            {
                $tempStr = 0 < $i ? "" : "checked";
                $rdiStr .= "<label><input type=\"radio\" name=\"rdiQuick" . $tblNo . "\" value=\"" . $i . "\" " . $tempStr . " />" . $val . "</label>";
                ++ $i;
                if ( $next && $i % $next == 0 )
                {
                    $rdiStr .= "<br />";
                }
            }
            $rdiStr .= "&nbsp;&nbsp;||&nbsp;&nbsp;";
        }
        else
        {
            foreach ( $rdiArr as $key=> $val )
            {
                $titleLabel = "";
                $rdiStr .= "<label><input type=\"radio\" name=\"rdiQuick" . $tblNo . "\" value=\"0\" checked />" . $val . "快调</label>";
            }
            $rdiStr .= "<br />";
        }
        $twoFStr = " class=\"twoF\"";
        $btnStr0To9 = "";
        if ( $r0To9Flag )
        {
            $btnStr0To9 = "◎";
            $i = 0;
            while ( $i < 10 )
            {
                $btnStr0To9 .= "&nbsp;<input type=\"button\" class=\"btnchoice\" id=\"btnMyId" . $tblNo . "_" . $i . "\" value=\"" . $i . "\" />";
                ++ $i;
            }
            $twoFStr = "";
        }
        $str3 = "<tr class=\"td2\"><td colspan=\"" . $colSpanN . "\" class=\"tdRate\"  id=\"myTbltd_" . $tblNo . "\" style=\"text-align:right;\" " . $twoFStr . ">&nbsp;";
        $str3 .= $rdiStr;
        $str3 .= $titleLabel;
        if ( $this->gametype != 24 )
        {
            $str3 .= "&nbsp;赔率X 增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" />";
            $str3 .= "&nbsp;赔率Y 增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" />";
        }
        $str3 .= "&nbsp;增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" />";
        $str3 .= "&nbsp;<span class=\"btnPositionType\"><input type=\"button\" class=\"btnchoice\" value=\"全部\" id=\"btnMyId" . $tblNo . "_All\" />&nbsp;";
        $str3 .= $showArr[0] ? "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"单双\" id=\"btnMyIdsd" . $tblNo . "_C1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"双\" id=\"btnMyId" . $tblNo . "_C2\" />" : "";
        if ( $this->gametype == 24 )
        {
            $str3 .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"单\" id=\"btnMyIdsd" . $tblNo . "_C1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"双\" id=\"btnMyId" . $tblNo . "_C2\" />";
            $str3 .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"大\" id=\"btnMyIdsd" . $tblNo . "_D1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"小\" id=\"btnMyId" . $tblNo . "_D2\" />";
        }
        $str3 .= "";
        if ( $showArr[2] )
        {
            foreach ( $this->colorname3 as $key=> $val )
            {
                $str3 .= "&nbsp;<input type=\"button\" class=\"btnchoice four5h0" . $key . "\" value=\"" . $val . "\" id=\"btnMyIdsd" . $tblNo . "_A" . $key . "\" />";
            }
            $str3 .= "&nbsp;◎";
        }
        if ( $showArr[3] )
        {
            foreach ( $this->colorname as $key=> $val )
            {
                $str3 .= "&nbsp;<input type=\"button\" class=\"btnchoice color5h0" . $key . "\" value=\"" . $val . "\" id=\"btnMyIdsd" . $tblNo . "_B" . $key . "\" />";
            }
        }
        $str3 .= $btnStr0To9;
        $str3 .= "</span>";
        $str3 .= "</td></tr>";
        $this->tblNo ++;
        return $str3;
    }

    public function crtQuickBtnSub4($subName,$xyFlag = true)
    {
        $rdiStr = "";
        $titleLabel = "";
        $tblNo = $this->tblNo;
        $rdiStr = "";
        $colspan = 8;
        $classN = "msgBox-yellow";
        $rdiStr .= "<table class=\"tblMy3D tblMy3DN btnPositionType\" width=\"100%\" style=\"font-size:13px;\">";
        $rdiStr .= "<tr class=\"td2\">";
        $rdiStr .= "<td class=\"" . $classN . " tdRate\" colspan=\"2\" style=\"border-top:0;width:40%\"  id=\"myTbltdE_0\">";
        $rdiStr .= "<label><input type=\"radio\" value=\"0\" checked />" . $subName . "</label>&nbsp;&nbsp;";
        if ( $xyFlag )
        {
            $rdiStr .= "<label>赔率X 增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" /></label>";
            $rdiStr .= "<label style=\"margin-left:5px;\">赔率Y 增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" /></label>";
        }
        else
        {
            $rdiStr .= "<label>增量：<input type=\"text\" value=\"0\" size=\"2\" class=\"txtAddVal\" /></label>";
        }
        $rdiStr .= "</td>";
        if ( $this->gametype != 24 )
        {
            if ( $this->_5hFlag )
            {
                $clrTitle = "色波";
                $frTitle = "四喜";
                $tblNoEn01 = "E";
                $tblNoEn02 = "F";
            }
            else
            {
                $clrTitle = "中发白";
                $frTitle = "方位";
                $tblNoEn01 = "L";
                $tblNoEn02 = "M";
            }
        }
        $rdiStr .= "<th class=\"" . $classN . "\" style=\"border-top:0\">" . $clrTitle . "</th>";
        $rdiStr .= "<td style=\"border-top:0\">";
        if($this->colorname){
			foreach ( $this->colorname as $key=> $val )
			{
				$rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice color5h0" . $key . "\" value=\"" . $val . "\" id=\"btnMyIdsd" . $tblNo . "_" . $tblNoEn01 . $key . "\" />";
			}
		}
        $rdiStr .= "</td>";
        $rdiStr .= "<th class=\"" . $classN . "\" style=\"border-top:0\">" . $frTitle . "</th>";
        $rdiStr .= "<td style=\"border-top:0\">";
        if($this->colorname3){
			foreach ( $this->colorname3 as $key=> $val )
			{
				$rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice four5h0" . $key . "\" value=\"" . $val . "\" id=\"btnMyIdsd" . $tblNo . "_" . $tblNoEn02 . $key . "\" />";
			}
		}
        $rdiStr .= "</td>";
        $rdiStr .= "</tr>";
        $rdiStr .= "<tr class=\"td2\">";
        $rdiStr .= "<th class=\"" . $classN . "\" >" . $subName . " 快调</th>";
        $rdiStr .= "<td>";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"单\" id=\"btnMyIdsd" . $tblNo . "_G1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"双\" id=\"btnMyId" . $tblNo . "_G2\" />";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"大\" id=\"btnMyIdsd" . $tblNo . "_H1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"小\" id=\"btnMyId" . $tblNo . "_H2\" />";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"合单\" id=\"btnMyIdsd" . $tblNo . "_I1\" />&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"合双\" id=\"btnMyId" . $tblNo . "_I2\" />";
        $rdiStr .= "</td>";
        $rdiStr .= "<th class=\"" . $classN . "\">头</th>";
        $rdiStr .= "<td>";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"0\" id=\"btnMyIdsd" . $tblNo . "_J0\" />";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"1\" id=\"btnMyIdsd" . $tblNo . "_J1\" />";
        $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"2\" id=\"btnMyIdsd" . $tblNo . "_J2\" />";
        $rdiStr .= "</td>";
        $rdiStr .= "<th class=\"" . $classN . "\">尾</th>";
        $rdiStr .= "<td>";
        $i = 0;
        while ( $i < 10 )
        {
            $rdiStr .= "&nbsp;<input type=\"button\" class=\"btnchoice\" value=\"" . $i . "\" id=\"btnMyIdsd" . $tblNo . "_K" . $i . "\" />";
            ++ $i;
        }
        $rdiStr .= "</td>";
        $rdiStr .= "</tr>";
        $rdiStr .= "<tr class=\"td2\">";
        $rdiStr .= "<td class=\"msgBox-Green\" colspan=\"6\">";
        $rdiStr .= $this->_5hFlag && $this->gametype != 24 ? "※※ 快调按钮,四喜与双面(单,双,大,小...)等，<font color=\"#BE0200\">不含号码21</font> ※※" : "";
        $rdiStr .= "</td>";
        $rdiStr .= "</tr>";
        $rdiStr .= "</table>";
        $this->tblNo ++;
        return $rdiStr;
    }

    public function crtDblSubmitBtn($url = "")
    {
        $str = "";
        $str .= "<input type=\"submit\" value=\"确定更改 :: " . $this->diskName . "赔率\" class=\"colorBtnGray\"  />";
        $str .= "&nbsp;<input type=\"button\" value=\"重读\" onclick=\"javascript:location.replace(" . "'" . $this->reloadUrl . "'" . ");\" class=\"colorBtnGray\"  />";
        return $str;
    }

    public function crtDblCopyRateBtn($url = "")
    {
        $msg = $this->sLottoId ? "本期" : "基本赔率";
        if ( $this->gametype == 24 )
        {
            $str = "";
            $str .= "<input type=\"button\" onclick=\"javascript:copyRateBtnSub('确定要把 " . $msg . " 平码一定位玩法(X,Y盘,a,b,c,d盘)的赔率复制到平码二~四及特码定位玩法吗？');\" value=\"复制赔率 :: 将「冠军」之赔率同步至「第二~第十位」\" class=\"colorBtnGray\"  />";
            $str .= "<ul>「复制赔率」使用说明:<li style=\"font-weight:bold;color:red\">使用前请先储存平码一定位玩法的赔率</li><li>按下复制赔率一钮後，系统将自动把平码一定位玩法(X,Y盘,a,b,c,d盘)的赔率复制到平码二~四及特码定位玩法，<br />原平码二~四定位玩法之赔率将被复盖\，不保留</li><li>使用复制赔率後，请切换至平码二~四及特码定位玩法页，检查赔率(X,Y盘,a,b,c,d盘)是否已和平码一同步</li></ul>";
        }
        else if ( $this->_5hFlag )
        {
            $str = "";
            $str .= "<input type=\"button\" onclick=\"javascript:copyRateBtnSub('确定要把 " . $msg . " 平码一定位玩法(X,Y盘,a,b,c,d盘)的赔率复制到平码二~四及特码定位玩法吗？');\" value=\"复制赔率 :: 将「平码一」定位玩法之赔率同步至「平码二~四及特码」定位玩法\" class=\"colorBtnGray\"  />";
            $str .= "<ul>「复制赔率」使用说明:<li style=\"font-weight:bold;color:red\">使用前请先储存平码一定位玩法的赔率</li><li>按下复制赔率一钮後，系统将自动把平码一定位玩法(X,Y盘,a,b,c,d盘)的赔率复制到平码二~四及特码定位玩法，<br />原平码二~四定位玩法之赔率将被复盖\，不保留</li><li>使用复制赔率後，请切换至平码二~四及特码定位玩法页，检查赔率(X,Y盘,a,b,c,d盘)是否已和平码一同步</li></ul>";
        }
        else
        {
            $str = "";
            $str .= "<input type=\"button\" onclick=\"javascript:copyRateBtnSub('确定要把 " . $msg . " 第一球玩法(a,b,c,d盘)的赔率复制到第二~八球定位玩法吗？');\" value=\"复制赔率 :: 将「第一球」定位玩法之赔率同步至「第二~八球」定位玩法\" class=\"colorBtnGray\"  />";
            $str .= "<ul>「复制赔率」使用说明:<li style=\"font-weight:bold;color:red\">使用前请先储存第一球定位玩法的赔率</li><li>按下复制赔率一钮後，系统将自动把第一球定位玩法(a,b,c,d盘)的赔率复制到第二~八球定位玩法，<br />原第二~八球定位玩法之赔率将被复盖\，不保留</li><li>使用复制赔率後，请切换至第二~八球定位玩法页，检查赔率(a,b,c,d盘)是否已和第一球同步</li></ul>";
        }
        return $str;
    }

    public function crt_2face_td_xy($rdata,$bettype,$subid,$betNamArr,$disk,$classN = "",$tdIdStr = "")
    {
        $str = "";
        $setBtnId = "";
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $idx = 0;
        $colNum = $this->gametype == 20 ? "2" : "1";
        if ( in_array($bettype,$this->betXYArr) )
        {
            $i = 0;
            $l = count($betNamArr);
            while ( $i < $l )
            {
                if ( $betNamArr[$i] == "" )
                {
                    $str .= "<td colspan=\"3\">&nbsp;</td>";
                }
                else
                {
                    $num = str_pad($i + 1,2,"0",STR_PAD_LEFT);
                    $setBtnName = $setBtnNamePre . $num;
                    $ridx = "r" . $num;
                    $rate_1 = floatval($rdata[1][$ridx]);
                    $rate_2 = floatval($rdata[2][$ridx]);
                    $classShow = $classN ? $classN . $num : "";
                    $str .= "<th class=\"td6 " . $classShow . " \">" . $betNamArr[$i] . "</th>";
                    $str .= "<td><input type=\"text\" class=\"iptRate " . $tdIdStr . "\" size=\"3\" name=\"" . $setBtnName . "_1\" value=\"" . $rate_1 . "\"  />";
                    $str .= "<input onclick=\"btnAdd1([" . $setBtnName . "_1, " . $setBtnName . "_2],-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1([" . $setBtnName . "_1, " . $setBtnName . "_2],0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
                    $str .= "</td>";
                    $str .= "<td><input type=\"text\" class=\"iptRate " . $tdIdStr . "\" size=\"3\" name=\"" . $setBtnName . "_2\" value=\"" . $rate_2 . "\"  /></td>";
                }
                ++ $i;
            }
        }
        else
        {
            $i = 0;
            $l = count($betNamArr);
            while ( $i < $l )
            {
                if ( $betNamArr[$i] == "" )
                {
                    $str .= ( "<td colspan=\"" . ( $colNum + 1 ) ) . "\">&nbsp;</td>";
                }
                else
                {
                    $num = str_pad($i + 1,2,"0",STR_PAD_LEFT);
                    $setBtnName = $setBtnNamePre . $num;
                    $ridx = "r" . $num;
                    $rate_0 = floatval($rdata[0][$ridx]);
                    $classShow = $classN ? $classN . $num : "";
                    $str .= "<th class=\"td6 " . $classShow . " \">" . $betNamArr[$i] . "</th>";
                    $str .= "<td colspan=\"" . $colNum . "\" align=\"left\" style=\"padding-left:10px;\"><input type=\"text\" class=\"iptRate " . $tdIdStr . "\" size=\"6\" name=\"" . $setBtnName . "_0\" value=\"" . $rate_0 . "\"  />";
                    $str .= "<input onclick=\"btnAdd1([" . $setBtnName . "_0],-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\" -  \" TabIndex=\"9999\" /><input onclick=\"btnAdd1([" . $setBtnName . "_0],0.01)\" type=\"button\" class=\"colorBtnGray\" value=\" + \" TabIndex=\"9999\" />";
                    $str .= "</td>";
                }
                ++ $i;
            }
        }
        return $str;
    }

    public function crt_01To21($dataArr = "")
    {
        if ( isset($dataArr['disk']) )
        {
            $disk = $dataArr['disk'];
        }
        else
        {
            return "error disk";
        }
        if ( isset($dataArr['subid']) )
        {
            $subid = $dataArr['subid'];
        }
        else
        {
            return "error subid";
        }
        if ( isset($dataArr['bid']) )
        {
            $bid = $dataArr['bid'];
        }
        else
        {
            return "error bid";
        }
        $bettype = $bid;
        $rateArr = $this->getRateArrXY($bettype,$disk,$subid);
        $tdNum = count($rateArr);
        $setBtnNamePre = "n_" . $bettype . "_" . $subid . "_" . $disk . "_";
        $str = "";
        $strArr = array();
        if ( $this->gametype == 24 )
        {
            if ( $dataArr['bid'] == 5 )
            {
                $endNumber = 17;
                $rowNumber = 4;
                $classIdxNum = 4;
                $classPreStr = "four5hB0";
            }
            else
            {
                $endNumber = 10;
                $rowNumber = 2;
                $classPreStr = "";
            }
        }
        else if ( $this->_5hFlag )
        {
            $endNumber = 21;
            $classIdxNum = 3;
            $classPreStr = "color5hB0";
            $rowNumber = 4;
        }
        else
        {
            $endNumber = 20;
            $classIdxNum = 4;
            $classPreStr = "four5hB0";
            $rowNumber = 4;
        }
        while ( $i < $rowNumber )
        {
            $strArr[] = "<tr class=\"td2\" align=\"center\">";
            ++ $i;
        }
        $i = 0;
        while ( $i < $endNumber )
        {
            $idx = $i % $rowNumber;
            $classIdx = $i % $classIdxNum + 1;
            if ( $this->gametype == 24 && $dataArr['bid'] == 5 )
            {
                $numIdx = $i + 3;
            }
            else
            {
                $numIdx = $i + 1;
            }
            $num = str_pad($numIdx,2,"0",STR_PAD_LEFT);
            $rateIdx = "r" . $num;
            if ( $this->gametype == 24 && $dataArr['bid'] != 5 )
            {
                $strArr[$idx] .= "<th class=\"td6\"><img src=\"image/pk" . $numIdx . ".png\"></th>";
            }
            else
            {
                $strArr[$idx] .= "<th class=\"td6 " . $classPreStr . $classIdx . "\">" . $numIdx . "</th>";
            }

            foreach ( $rateArr as $rateArrKey=> $rateArrVal )
            {
                $rate = floatval($rateArr[$rateArrKey][$rateIdx]);
                $setBtnName = $setBtnNamePre . $num . "_" . $rateArrKey;
                $strArr[$idx] .= "<td><input type=\"text\" name=\"" . $setBtnName . "\" class=\"iptRate\" size=\"5\" value=\"" . $rate . "\" />";
                $strArr[$idx] .= "<input onclick=\"btnAdd1([" . $setBtnName . "],-0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"- \" TabIndex=\"9999\" /><input onclick=\"btnAdd1([" . $setBtnName . "],0.01)\" type=\"button\" class=\"colorBtnGray\" value=\"+\" TabIndex=\"9999\" />";
                $strArr[$idx] .= "</td>";
            }
            ++ $i;
        }
        if ( $this->gametype != 24 )
        {
            while ( $idx < 3 )
            {
 ++ $idx;
                $strArr[$idx] .= "<th class=\"td6\">&nbsp;</th>";
                $i = 0;
                while ( $i < $tdNum )
                {
                    $strArr[$idx] .= "<td>&nbsp;</td>";
                    ++ $i;
                }
            }
        }
        $str = implode("</tr>",$strArr) . "</tr>";
        return "<tbody class=\"tbdRate\">" . $str . "</tbody>";
    }

    public function crt_jsSub()
    {
        $strTbl = "";
        $strTbl .= "<script>";
        $strTbl .= "\$(function(){ \$(\"#spnBetBtn input:button\").click(function(){ ";
        $strTbl .= " var subid = \$(this).index();";
        $strTbl .= "var url = \"" . $this->subURL . "\";";
        $strTbl .= "var urlId = subid - 0 + 1;";
        $strTbl .= "window.location.replace(url + \"&subid=\" + urlId);";
        $strTbl .= " }); });";
        $strTbl .= "</script>";
        return $strTbl;
    }

    public function crt_jsSubBid($showBet = array())
    {
        $strTbl = "";
        $strTbl .= "<script>";
        $strTbl .= "\$(function(){ \$(\"#spnBetBtn input:button\").click(function(){ ";
        $strTbl .= " var bid = \$(this).index();";
        $strTbl .= "var url = \"" . $this->subURL . "\";";
        $strTbl .= "var urlId = bid - 0;";
        $strTbl .= "var urlIdArr = [" . implode(",",$showBet) . "];";
        $strTbl .= "window.location.replace(url + \"&bid=\" + urlIdArr[urlId]);";
        $strTbl .= " }); });";
        $strTbl .= "</script>";
        return $strTbl;
    }

    public function show_r1($disk = "a")
    {
        $strDisk = "";
        $idx = $this->diskIdxArr[$disk];
        $class = "gray" . $idx;
        $strTbl_header = "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th>";
        $strTbl_header .= "<th>项目</th><th>赔率X</th><th>赔率Y</th><th>项目</th><th>赔率X</th><th>赔率Y</th>";
        $strTbl_header .= "<th>项目</th><th>赔率X</th><th>赔率Y</th><th>项目</th><th>赔率X</th><th>赔率Y</th>";
        $strTbl_header .= "</tr></thead>";
        $strTbl00 = "";
        $strTbl01 = "";
        $strTbl02 = "";
        $subid = 0;
        $bettype = 7;
        $strTbl00 .= "<tr class=\"td2\"><th class=\"" . $class . "\">全五码</th>";
        $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(7,$idx,$subid),7,0,array("总单","总双"),$idx,"intQA");
        $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(8,$idx,$subid),8,0,array("总大","总小"),$idx,"intQB");
        $strTbl00 .= "</tr>";
        foreach ( $this->bignumArr as $key=> $val )
        {
            $strTbl01 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(1,$idx,$key),1,$key,array("单","双"),$idx,"intQC");
            $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(2,$idx,$key),2,$key,array("大","小"),$idx,"intQD");
            $strTbl01 .= "</tr>";
            $strTbl02 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(4,$idx,$key),4,$key,array("合单","合双"),$idx,"intQE");
            $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(3,$idx,$key),3,$key,array("尾大","尾小"),$idx,"intQF");
            $strTbl02 .= "</tr>";
        }
        $strTbl = "<style>.tbdRate tbody{ border-top:2px dashed #A9A9A9; }</style><table class=\"tblMy3D\" width=\"" . $this->tblW . "\"  style=\"text-align:center\">";
        $strTbl .= $strTbl_header;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl00 . "</tbody>";
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl01 . "</tbody>";
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl02 . "</tbody>";
        $strTbl .= $this->crtQuickBtn2face(array("全五码","平码1~4,特码","平码1~4,特码::合,尾"),13,false,array(1,1,0,0,1,1,1,1),0,true);
        $strTbl .= "<thead>" . $this->crtQuickBtnCountXY(13,"双面盘系列") . "</thead>";
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1_8h($disk = "a")
    {
        $strDisk = "";
        $idx = $this->diskIdxArr[$disk];
        $class = "gray" . $idx;
        $strTbl_header = "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th>";
        if ( $this->gametype == 24 )
        {
            $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        }
        else
        {
            $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
            $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        }
        $strTbl_header .= "</tr></thead>";
        $strTbl00 = "";
        $strTbl01 = "";
        $strTbl02 = "";
        $subid = 0;
        if ( $this->gametype != 24 )
        {
            $strTbl00 .= "<tr class=\"td2\"><th class=\"" . $class . "\" rowspan=\"2\">总合与<br />龙虎</th>";
            $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(7,$idx,$subid),7,0,array("总单","总双"),$idx,"intQA");
            $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(8,$idx,$subid),8,0,array("总大","总小"),$idx,"intQB");
            $strTbl00 .= "</tr>";
            $strTbl00 .= "<tr class=\"td2\">";
            $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(9,$idx,$subid),9,0,array("总尾大","总尾小"),$idx,"intQF");
            $strTbl00 .= $this->crt_2face_td_xy($this->getRateArrXY(18,$idx,$subid),18,0,array("龙","虎"),$idx,"intQB");
            $strTbl00 .= "</tr>";
        }
        if ( $this->gametype == 24 )
        {
            foreach ( $this->bignumArr as $key=> $val )
            {
                if ( $key != 0 )
                {
                    $strTbl01 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
                    $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(1,$idx,$key),1,$key,array("单","双"),$idx,"intQC");
                    $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(2,$idx,$key),2,$key,array("大","小"),$idx,"intQD");
                    switch ( $key )
                    {
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                            $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(6,$idx,$key),6,$key,array("龙","虎"),$idx,"intQB");
                            break;
                        default:
                            $strTbl01 .= "<td colspan=\"3\">&nbsp;</td>";
                            $strTbl01 .= "<td colspan=\"3\">&nbsp;</td>";
                            break;
                    }
                    $strTbl01 .= "</tr>";
                }
                else
                {
                    $strTbl02 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
                    $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(3,$idx,$key),3,0,array("单","双"),$idx,"intQE");
                    $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(4,$idx,$key),4,0,array("大","小"),$idx,"intQF");
                    $strTbl02 .= "<td colspan=\"3\">&nbsp;</td>";
                    $strTbl02 .= "<td colspan=\"3\">&nbsp;</td>";
                    $strTbl02 .= "</tr>";
                }
            }
        }
        else
        {
            foreach ( $this->bignumArr as $key=> $val )
            {
                $strTbl01 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
                $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(1,$idx,$key),1,$key,array("单","双"),$idx,"intQC");
                $strTbl01 .= $this->crt_2face_td_xy($this->getRateArrXY(2,$idx,$key),2,$key,array("大","小"),$idx,"intQD");
                $strTbl01 .= "</tr>";
                $strTbl02 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
                $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(4,$idx,$key),4,$key,array("合单","合双"),$idx,"intQE");
                $strTbl02 .= $this->crt_2face_td_xy($this->getRateArrXY(3,$idx,$key),3,$key,array("尾大","尾小"),$idx,"intQF");
                $strTbl02 .= "</tr>";
            }
        }
        $strTbl = "<style>.tbdRate tbody{ border-top:2px dashed #A9A9A9; }</style><table class=\"tblMy3D\" width=\"" . $this->tblW . "\"  style=\"text-align:center\">";
        $strTbl .= $strTbl_header;
        if ( $strTbl00 != "" )
        {
            $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl00 . "</tbody>";
        }
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl01 . "<tr></tbody>";
        $strTbl .= $strTbl_header;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl02 . "</tbody>";
        if ( $this->gametype == 24 )
        {
            $strTbl .= $this->crtQuickBtn2face(array("名次","冠亚"),13,false,array(0,0),0,false);
        }
        else
        {
            $strTbl .= $this->crtQuickBtn2face(array("总合,龙虎","第一~八球双面","第一~八球::合,尾::双面"),9,false,array(1,1,0,0,1,1,1,1),0,false);
        }
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1clr($disk = "a")
    {
        $strDisk = "";
        $idx = $this->diskIdxArr[$disk];
        $class = "gray" . $idx;
        $strTbl_header = "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th>";
        $strTbl_header .= "<th>项目</th><th colspan=\"2\">赔率</th><th>项目</th><th colspan=\"2\">赔率</th>";
        $strTbl_header .= "<th>项目</th><th colspan=\"2\">赔率</th><th>项目</th><th colspan=\"2\">赔率</th>";
        $strTbl_header .= "</tr></thead>";
        $strTbl_header2 = "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th>";
        $strTbl_header2 .= "<th>项目</th><th>赔率X</th><th>赔率Y</th><th>项目</th><th>赔率X</th><th>赔率Y</th>";
        $strTbl_header2 .= "<th>项目</th><th>赔率X</th><th>赔率Y</th><th>项目</th><th>赔率X</th><th>赔率Y</th>";
        $strTbl_header2 .= "</tr></thead>";
        $strTbl01 = "";
        $strTbl02 = "";
        $strTbl03 = "";
        $strTbl04 = "";
        foreach ( $this->bignumArr as $key=> $val )
        {
            $strTbl03 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl03 .= $this->crt_2face_td_xy($this->getRateArrXY(6,$idx,$key),6,$key,array("福","禄","寿","喜"),$idx,"four5hB");
            $strTbl03 .= "</tr>";
            $strTbl04 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl04 .= $this->crt_2face_td_xy($this->getRateArrXY(5,$idx,$key),5,$key,array("红","蓝","绿",""),$idx,"color5hB");
            $strTbl04 .= "</tr>";
        }
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\"  style=\"text-align:center\">";
        $strTbl .= $strTbl_header2;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl03 . "</tbody>";
        $strTbl .= $strTbl_header;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl04 . "</tbody>";
        $strTbl .= $this->crtQuickBtn2face(array("四喜","色波"),13,false,array(0,0,1,1,0,0,0,0),0,true);
        $strTbl .= "<thead>" . $this->crtQuickBtnCountXY(13,"四喜色波系列") . "</thead>";
        $strTbl .= "<tr><td colspan=\"13\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_r1clr_8h($disk = "a")
    {
        $strDisk = "";
        $idx = $this->diskIdxArr[$disk];
        $class = "gray" . $idx;
        $strTbl_header = "<thead class=\"bgClc_" . $this->gametype . "\"><tr><th>类别</th>";
        $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl_header .= "<th>项目</th><th>赔率</th><th>项目</th><th>赔率</th>";
        $strTbl_header .= "</tr></thead>";
        $strTbl01 = "";
        $strTbl02 = "";
        $strTbl03 = "";
        $strTbl04 = "";
        foreach ( $this->bignumArr as $key=> $val )
        {
            $strTbl03 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl03 .= $this->crt_2face_td_xy($this->getRateArrXY(6,$idx,$key),6,$key,array("东","南","西","北"),$idx,"four5hB");
            $strTbl03 .= "</tr>";
            $strTbl04 .= "<tr class=\"td2\"><th class=\"" . $class . "\">" . $val . "</th>";
            $strTbl04 .= $this->crt_2face_td_xy($this->getRateArrXY(5,$idx,$key),5,$key,array("中","发","白",""),$idx,"color5hB");
            $strTbl04 .= "</tr>";
        }
        $strTbl = "<table class=\"tblMy3D\" width=\"" . $this->tblW . "\"  style=\"text-align:center\">";
        $strTbl .= $strTbl_header;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl03 . "</tbody>";
        $strTbl .= $strTbl_header;
        $strTbl .= "<tbody class=\"tbdRate\">" . $strTbl04 . "</tbody>";
        $strTbl .= $this->crtQuickBtn2face(array("方位","中发白"),9,false,array(0,0,1,1,0,0,0,0),0,false);
        $strTbl .= "<tr><td colspan=\"9\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_rnp($disk = "a",$subid = 1)
    {
        $strTbl = "";
        $strTbl .= $this->crt_jsSub();
        $diskIdx = $this->diskIdxArr[$disk];
        $tblNo = 0;
        $strTbl .= "<span id=\"spnBetBtn\">";
        foreach ( $this->bignumArr as $key=> $val )
        {
            if ( $key == $subid )
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype . "\" style=\"height:30px; font-size:15px; font-weight:100; border-bottom:solid 1px #fff; color:blue; border-top:0;";
            }
            else
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype;
            }
            $strTbl .= "<input type=\"button\" value=\"" . $val . "\" class=\"" . $class . "\" />";
        }
        $strTbl .= "</span>";
        $strTbl .= "<br />";
        $strTbl .= "<table class=\"tblMy3D\" style=\"text-align:center\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $this->bignumArr[$subid] . " ::&nbsp;&nbsp;&nbsp;" . $this->diskName . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr>";
        $i = 0;
        while ( $i < ($this->gametype == 24 ? 5 : 6) )
        {
            $strTbl .= "<th>号码</th><th>赔率</th>";
            ++ $i;
        }
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_01To21(array(
            "disk"=>$diskIdx,
            "subid"=>$subid,
            "bid"=>0
                ));
        $strTbl .= "<tfoot>";
        $strTbl .= "<tr><td colspan=\"18\" style=\"padding:0; margin:0; border:0\">" . $this->crtQuickBtnSub4($this->bignumArr[$subid],false) . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        if ( $subid == 1 )
        {
            $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"left\">" . $this->crtDblCopyRateBtn() . "</td></tr>";
        }
        $strTbl .= "</tfoot>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_rnp_8h($disk = "a",$subid = 1)
    {
        $strTbl = "";
        $strTbl .= $this->crt_jsSub();
        $diskIdx = $this->diskIdxArr[$disk];
        $tblNo = 0;
        $strTbl .= "<span id=\"spnBetBtn\">";
        $bignumArr = $this->bignumArr;
        unset($bignumArr[0]);
        foreach ( $bignumArr as $key=> $val )
        {
            if ( $key == $subid )
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype . "\" style=\"height:30px; font-size:15px; font-weight:100; border-bottom:solid 1px #fff; color:blue; border-top:0;";
            }
            else
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype;
            }
            $strTbl .= "<input type=\"button\" value=\"" . $val . "\" class=\"" . $class . "\" />";
        }
        $strTbl .= "</span>";
        $strTbl .= "<br />";
        $strTbl .= "<table class=\"tblMy3D\" style=\"text-align:center\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $this->bignumArr[$subid] . " ::&nbsp;&nbsp;&nbsp;" . $this->diskName . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr>";
        $i = 0;
        while ( $i < 5 )
        {
            $strTbl .= "<th>号码</th><th>赔率</th>";
            ++ $i;
        }
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_01To21(array("disk"=>$diskIdx,"subid"=>$subid,"bid"=>0));
        $strTbl .= "<tfoot>";
        $strTbl .= "<tr><td colspan=\"18\" style=\"padding:0; margin:0; border:0\">" . $this->crtQuickBtnSub4($this->bignumArr[$subid],false) . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        if ( $subid == 1 )
        {
            $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"left\">" . $this->crtDblCopyRateBtn() . "</td></tr>";
        }
        $strTbl .= "</tfoot>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_rc($disk = "a",$subid = 0,$bid = 0)
    {
        $showBetArr = array(9=>"一中一",10=>"二中二",11=>"三中二",12=>"三中三",13=>"四中三",14=>"五中三");
        $diskIdx = $this->diskIdxArr[$disk];
        $strTbl = "";
        $strTbl .= $this->crt_jsSubBid(array_keys($showBetArr));
        $tblNo = 0;
        $strTbl .= "<span id=\"spnBetBtn\">";
        foreach ( $showBetArr as $key=> $val )
        {
            if ( $key == $bid )
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype . "\" style=\"height:30px; font-size:15px; font-weight:100; border-bottom:solid 1px #fff; color:blue; border-top:0;";
            }
            else
            {
                $class = "colorBtn01 clrBrd_" . $this->gametype;
            }
            $strTbl .= "<input type=\"button\" value=\"" . $val . "\" class=\"" . $class . "\" />";
        }
        $strTbl .= "</span>";
        $strTbl .= "<br />";
        $strTbl .= "<table class=\"tblMy3D\" style=\"text-align:center\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $showBetArr[$bid] . " ::&nbsp;&nbsp;&nbsp;" . $this->diskName . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr>";
        $i = 0;
        while ( $i < 6 )
        {
            $strTbl .= "<th>号码</th><th>赔率</th>";
            ++ $i;
        }
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_01To21(array(
            "disk"=>$diskIdx,
            "subid"=>$subid,
            "bid"=>$bid
                ));
        $strTbl .= "<tfoot>";
        $strTbl .= "<tr><td colspan=\"18\" style=\"padding:0; margin:0; border:0\">" . $this->crtQuickBtnSub4($showBetArr[$bid],false) . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</tfoot>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function show_rc_8h($disk = "a",$subid = 0,$bid = 0)
    {
        $showBetArr = array(10=>"选二任选",11=>"选二连组",12=>"选二连直",13=>"选三任选",14=>"选三前组",15=>"选三前直",16=>"选四任选",17=>"选五任选");
        $diskIdx = $this->diskIdxArr[$disk];
        $strTbl = "";
        $strTbl .= $this->crt_jsSubBid(array_keys($showBetArr));
        $tblNo = 0;
        if ( $this->gametype != 24 )
        {
            $strTbl .= "<span id=\"spnBetBtn\">";
            foreach ( $showBetArr as $key=> $val )
            {
                if ( $key == $bid )
                {
                    $class = "colorBtn01 clrBrd_" . $this->gametype . "\" style=\"height:30px; font-size:15px; font-weight:100; border-bottom:solid 1px #fff; color:blue; border-top:0;";
                }
                else
                {
                    $class = "colorBtn01 clrBrd_" . $this->gametype;
                }
                $strTbl .= "<input type=\"button\" value=\"" . $val . "\" class=\"" . $class . "\" />";
            }
            $strTbl .= "</span>";
            $strTbl .= "<br />";
        }
        $strTbl .= "<table class=\"tblMy3D\" style=\"text-align:center\" width=\"" . $this->tblW . "\">";
        $strTbl .= "<caption class=\"bgImg_" . $this->gametype . "\">" . $showBetArr[$bid] . " ::&nbsp;&nbsp;&nbsp;" . $this->diskName . "</caption>";
        $strTbl .= "<thead class=\"bgClc_" . $this->gametype . "\"><tr>";
        $i = 0;
        while ( $i < 5 )
        {
            $strTbl .= "<th>号码</th><th>赔率</th>";
            ++ $i;
        }
        $strTbl .= "</tr></thead>";
        $strTbl .= $this->crt_01To21(array("disk"=>$diskIdx,"subid"=>$subid,"bid"=>$bid));
        $strTbl .= "<tfoot>";
        $strTbl .= "<tr><td colspan=\"18\" style=\"padding:0; margin:0; border:0\">" . $this->crtQuickBtnSub4($showBetArr[$bid],false) . "</td></tr>";
        $strTbl .= "<tr><td colspan=\"18\" class=\"td2\" align=\"right\">" . $this->crtDblSubmitBtn() . "</td></tr>";
        $strTbl .= "</tfoot>";
        $strTbl .= "</table>";
        return $strTbl;
    }

    public function getRateArrXY($bettype,$diskIdx,$subid)
    {
        $rateArr = array();
        if ( in_array($bettype,$this->betXYArr) )
        {
            $rateArr[1] = $this->getRates($this->sLottoId,1,$diskIdx,$bettype,$subid);
            $rateArr[2] = $this->getRates($this->sLottoId,2,$diskIdx,$bettype,$subid);
        }
        else
        {
            $rateArr[0] = $this->getRates($this->sLottoId,0,$diskIdx,$bettype,$subid);
        }
        return $rateArr;
    }

}

?>